package com.ophiux.cs.domain.consult.model.entity;

import com.ophiux.cs.domain.core.Entity;

/**
 * 咨询用户实体
 * @author chenh
 *
 */
public class CSUser extends Entity{

	private final static String STATE_VALID = "1";
	private final static String STATE_INVALID = "0";
	
	private String ID;	//自增长
	
	private String TARGET_ID;	//用户ID
	
	private String TARGET_NAME;	//用户昵称
	
	private String SEX;	//用户性别  1:男   0：女
	
	private String PHOTO_URL;	//用户头像
	
	private String ROLE;	//角色  1：医生 2：患者
	
	private String STATE;	//1:有效  0:失效 默认1
	
	private String REG_DATE;	//注册时间
	
	private String RECENT_TIME;	//最近修改时间
	
	private String TARGET_ACC;	//用户账号

	public String getID() {
		return ID;
	}

	public void setID(String iD) {
		ID = iD;
	}

	public String getTARGET_ID() {
		return TARGET_ID;
	}

	public void setTARGET_ID(String tARGET_ID) {
		TARGET_ID = tARGET_ID;
	}

	public String getTARGET_NAME() {
		return TARGET_NAME;
	}

	public void setTARGET_NAME(String tARGET_NAME) {
		TARGET_NAME = tARGET_NAME;
	}

	public String getSEX() {
		return SEX;
	}

	public void setSEX(String sEX) {
		SEX = sEX;
	}

	public String getPHOTO_URL() {
		return PHOTO_URL;
	}

	public void setPHOTO_URL(String pHOTO_URL) {
		PHOTO_URL = pHOTO_URL;
	}

	public String getROLE() {
		return ROLE;
	}

	public void setROLE(String rOLE) {
		ROLE = rOLE;
	}

	public String getSTATE() {
		return STATE;
	}

	public void setSTATE(String sTATE) {
		STATE = sTATE;
	}

	public String getREG_DATE() {
		return REG_DATE;
	}

	public String getTARGET_ACC() {
		return TARGET_ACC;
	}

	public void setTARGET_ACC(String tARGET_ACC) {
		TARGET_ACC = tARGET_ACC;
	}

	public void setREG_DATE(String rEG_DATE) {
		REG_DATE = rEG_DATE;
	}

	public String getRECENT_TIME() {
		return RECENT_TIME;
	}

	public void setRECENT_TIME(String rECENT_TIME) {
		RECENT_TIME = rECENT_TIME;
	}
	
	/**
	 * 判断用户是否有效
	 * @return
	 */
	public boolean isValid() {
		return STATE_VALID.equals(this.STATE) ? true : false;
	}
	
	/**
	 * 删除用户
	 * @return
	 */
	public void remove() {
		this.setSTATE(STATE_INVALID);
	}
	
	/**
	 * 设置有效
	 */
	public void toValid() {
		this.setSTATE(STATE_VALID);
	}
	
	/**
	 * 验证密码是否正确
	 * @param inpPassword	外部输入密码
	 * @return
	 */
	public boolean validPassword(String inpPassword) {
		//暂时是无秘登录，直接范湖true
		return true;
	}
	
	
}
